package wodegua.d10_innerclass;

import javax.swing.*;
import java.awt.event.ActionEvent;

public class Test {
    public static void main(String[] args) {
        JFrame win = new JFrame("登录界面");
        JPanel panel = new JPanel();

        win.add(panel);

        JButton button = new JButton("登录");
        panel.add(button);

        button.addActionListener(new AbstractAction() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JOptionPane.showMessageDialog(win,"登录一下");
            }
        });

        win.setSize(400,400);
        win.setLocationRelativeTo(null);
        win.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        win.setVisible(true);
        System.out.println("--------------------------------");

        StringBuffer s = new StringBuffer();
        for (int i = 0; i < 1000000; i++) {
            s.append("abc");
        }
        System.out.println(s);
    }
}
